@@ -10,16 +10,16 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | class assets { |
| 12 | 12 | |
| 13 | - public function __construct(){ |
|
| 13 | + public function __construct() { |
|
| 14 | 14 | |
| 15 | - add_action('wp_enqueue_scripts', array($this,'scripts')); |
|
| 15 | + add_action('wp_enqueue_scripts', array($this, 'scripts')); |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | - public function scripts(){ |
|
| 18 | + public function scripts() { |
|
| 19 | 19 | |
| 20 | 20 | |
| 21 | 21 | // for now editus is disabled for mobile. it will be reenabled when mobile platforms are better supported |
| 22 | - if ( lasso_user_can('edit_posts')) { |
|
| 22 | + if (lasso_user_can('edit_posts')) { |
|
| 23 | 23 | |
| 24 | 24 | wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true); |
| 25 | 25 | |
@@ -34,83 +34,83 @@ discard block |
||
| 34 | 34 | // url for json api |
| 35 | 35 | $home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false; |
| 36 | 36 | |
| 37 | - $article_object = lasso_editor_get_option('article_class','lasso_editor'); |
|
| 37 | + $article_object = lasso_editor_get_option('article_class', 'lasso_editor'); |
|
| 38 | 38 | |
| 39 | - $article_object = empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object; |
|
| 39 | + $article_object = empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object; |
|
| 40 | 40 | |
| 41 | - $featImgClass = lasso_editor_get_option('featimg_class','lasso_editor'); |
|
| 42 | - if (empty( $featImgClass )) { |
|
| 41 | + $featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor'); |
|
| 42 | + if (empty($featImgClass)) { |
|
| 43 | 43 | $featImgClass = lasso_get_supported_theme_featured_image_class(); |
| 44 | 44 | } |
| 45 | - $titleClass = lasso_editor_get_option('title_class','lasso_editor'); |
|
| 46 | - if (empty( $titleClass )) { |
|
| 45 | + $titleClass = lasso_editor_get_option('title_class', 'lasso_editor'); |
|
| 46 | + if (empty($titleClass)) { |
|
| 47 | 47 | $titleClass = lasso_get_supported_theme_title_class(); |
| 48 | 48 | } |
| 49 | - $toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor'); |
|
| 50 | - $objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor'); |
|
| 51 | - $objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor'); |
|
| 49 | + $toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor'); |
|
| 50 | + $objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor'); |
|
| 51 | + $objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor'); |
|
| 52 | 52 | |
| 53 | 53 | // post id reference |
| 54 | - $postid = get_the_ID(); |
|
| 54 | + $postid = get_the_ID(); |
|
| 55 | 55 | |
| 56 | 56 | $strings = array( |
| 57 | - 'save' => __('Save','lasso'), |
|
| 58 | - 'saving' => __('Saving...','lasso'), |
|
| 59 | - 'saved' => __('Saved!','lasso'), |
|
| 60 | - 'adding' => __('Adding...','lasso'), |
|
| 61 | - 'added' => __('Added!','lasso'), |
|
| 62 | - 'loading' => __('Loading...','lasso'), |
|
| 63 | - 'loadMore' => __('Load More','lasso'), |
|
| 64 | - 'noPostsFound' => __('No more posts found','lasso'), |
|
| 65 | - 'fetchFail' => __('Fetching failed. REST API plugin may not have been installed or configured correctly.','lasso'), |
|
| 66 | - 'galleryCreated' => __('Gallery Created!','lasso'), |
|
| 67 | - 'galleryUpdated' => __('Gallery Updated!','lasso'), |
|
| 68 | - 'justWrite' => __('Just write...','lasso'), |
|
| 69 | - 'chooseImage' => __('Choose an image','lasso'), |
|
| 70 | - 'updateImage' => __('Update Image','lasso'), |
|
| 71 | - 'insertImage' => __('Insert Image','lasso'), |
|
| 72 | - 'selectImage' => __('Select Image','lasso'), |
|
| 73 | - 'removeFeatImg' => __('Remove featured image?','lasso'), |
|
| 74 | - 'updateSelectedImg' => __('Update Selected Image','lasso'), |
|
| 75 | - 'chooseImages' => __('Choose images','lasso'), |
|
| 76 | - 'editImage' => __('Edit Image','lasso'), |
|
| 77 | - 'addImages' => __('Add Images','lasso'), |
|
| 78 | - 'addNewGallery' => __('Add New Gallery','lasso'), |
|
| 79 | - 'selectGallery' => __('Select Lasso Gallery Image','lasso'), |
|
| 80 | - 'useSelectedImages' => __('Use Selected Images','lasso'), |
|
| 81 | - 'publishPost' => __('Publish Post?','lasso'), |
|
| 82 | - 'publishYes' => __('Yes, publish it!','lasso'), |
|
| 83 | - 'deletePost' => __('Trash Post?','lasso'), |
|
| 84 | - 'deleteYes' => __('Yes, trash it!','lasso'), |
|
| 85 | - 'warning' => __('Oh snap!','laso'), |
|
| 86 | - 'cancelText' => __('O.K. got it!','lasso'), |
|
| 87 | - 'missingClass' => __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.','lasso'), |
|
| 57 | + 'save' => __('Save', 'lasso'), |
|
| 58 | + 'saving' => __('Saving...', 'lasso'), |
|
| 59 | + 'saved' => __('Saved!', 'lasso'), |
|
| 60 | + 'adding' => __('Adding...', 'lasso'), |
|
| 61 | + 'added' => __('Added!', 'lasso'), |
|
| 62 | + 'loading' => __('Loading...', 'lasso'), |
|
| 63 | + 'loadMore' => __('Load More', 'lasso'), |
|
| 64 | + 'noPostsFound' => __('No more posts found', 'lasso'), |
|
| 65 | + 'fetchFail' => __('Fetching failed. REST API plugin may not have been installed or configured correctly.', 'lasso'), |
|
| 66 | + 'galleryCreated' => __('Gallery Created!', 'lasso'), |
|
| 67 | + 'galleryUpdated' => __('Gallery Updated!', 'lasso'), |
|
| 68 | + 'justWrite' => __('Just write...', 'lasso'), |
|
| 69 | + 'chooseImage' => __('Choose an image', 'lasso'), |
|
| 70 | + 'updateImage' => __('Update Image', 'lasso'), |
|
| 71 | + 'insertImage' => __('Insert Image', 'lasso'), |
|
| 72 | + 'selectImage' => __('Select Image', 'lasso'), |
|
| 73 | + 'removeFeatImg' => __('Remove featured image?', 'lasso'), |
|
| 74 | + 'updateSelectedImg' => __('Update Selected Image', 'lasso'), |
|
| 75 | + 'chooseImages' => __('Choose images', 'lasso'), |
|
| 76 | + 'editImage' => __('Edit Image', 'lasso'), |
|
| 77 | + 'addImages' => __('Add Images', 'lasso'), |
|
| 78 | + 'addNewGallery' => __('Add New Gallery', 'lasso'), |
|
| 79 | + 'selectGallery' => __('Select Lasso Gallery Image', 'lasso'), |
|
| 80 | + 'useSelectedImages' => __('Use Selected Images', 'lasso'), |
|
| 81 | + 'publishPost' => __('Publish Post?', 'lasso'), |
|
| 82 | + 'publishYes' => __('Yes, publish it!', 'lasso'), |
|
| 83 | + 'deletePost' => __('Trash Post?', 'lasso'), |
|
| 84 | + 'deleteYes' => __('Yes, trash it!', 'lasso'), |
|
| 85 | + 'warning' => __('Oh snap!', 'laso'), |
|
| 86 | + 'cancelText' => __('O.K. got it!', 'lasso'), |
|
| 87 | + 'missingClass' => __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.', 'lasso'), |
|
| 88 | 88 | 'missingConfirm' => __('Update Settings', 'lasso'), |
| 89 | - 'helperText' => __('one more letter','lasso'), |
|
| 89 | + 'helperText' => __('one more letter', 'lasso'), |
|
| 90 | 90 | 'editingBackup' => __('You are currently editing a backup copy of this post.') |
| 91 | 91 | ); |
| 92 | 92 | |
| 93 | - $api_url = trailingslashit( home_url() ) . 'lasso-internal-api'; |
|
| 93 | + $api_url = trailingslashit(home_url()).'lasso-internal-api'; |
|
| 94 | 94 | |
| 95 | 95 | $gallery_class = new gallery(); |
| 96 | 96 | $gallery_nonce_action = $gallery_class->nonce_action; |
| 97 | - $gallery_nonce = wp_create_nonce( $gallery_nonce_action ); |
|
| 97 | + $gallery_nonce = wp_create_nonce($gallery_nonce_action); |
|
| 98 | 98 | |
| 99 | 99 | // localized objects |
| 100 | 100 | $objects = array( |
| 101 | - 'ajaxurl' => esc_url( $api_url ), |
|
| 101 | + 'ajaxurl' => esc_url($api_url), |
|
| 102 | 102 | 'editor' => 'lasso--content', // ID of editable content (without #) DONT CHANGE |
| 103 | 103 | 'article_object' => $article_object, |
| 104 | 104 | 'featImgClass' => $featImgClass, |
| 105 | 105 | 'titleClass' => $titleClass, |
| 106 | 106 | 'strings' => $strings, |
| 107 | - 'settingsLink' => function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ), |
|
| 108 | - 'post_status' => get_post_status( $postid ), |
|
| 107 | + 'settingsLink' => function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'), |
|
| 108 | + 'post_status' => get_post_status($postid), |
|
| 109 | 109 | 'postid' => $postid, |
| 110 | 110 | 'permalink' => get_permalink(), |
| 111 | 111 | 'edit_others_pages' => current_user_can('edit_others_pages') ? true : false, |
| 112 | 112 | 'edit_others_posts' => current_user_can('edit_others_posts') ? true : false, |
| 113 | - 'userCanEdit' => current_user_can('edit_post', $postid ), |
|
| 113 | + 'userCanEdit' => current_user_can('edit_post', $postid), |
|
| 114 | 114 | 'can_publish_posts' => current_user_can('publish_posts'), |
| 115 | 115 | 'can_publish_pages' => current_user_can('publish_pages'), |
| 116 | 116 | 'author' => is_user_logged_in() ? get_current_user_ID() : false, |
@@ -144,24 +144,24 @@ discard block |
||
| 144 | 144 | 'postTags' => lasso_get_objects('tag'), |
| 145 | 145 | 'noResultsDiv' => lasso_editor_empty_results(), |
| 146 | 146 | 'noRevisionsDiv' => lasso_editor_empty_results('revision'), |
| 147 | - 'mapTileProvider' => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false, |
|
| 148 | - 'mapLocations' => get_post_meta( $postid, 'ase_map_component_locations' ), |
|
| 149 | - 'mapStart' => get_post_meta( $postid, 'ase_map_component_start_point', true ), |
|
| 150 | - 'mapZoom' => get_post_meta( $postid, 'ase_map_component_zoom', true ), |
|
| 147 | + 'mapTileProvider' => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false, |
|
| 148 | + 'mapLocations' => get_post_meta($postid, 'ase_map_component_locations'), |
|
| 149 | + 'mapStart' => get_post_meta($postid, 'ase_map_component_start_point', true), |
|
| 150 | + 'mapZoom' => get_post_meta($postid, 'ase_map_component_zoom', true), |
|
| 151 | 151 | 'revisionModal' => lasso_editor_revision_modal(), |
| 152 | 152 | 'isMobile' => wp_is_mobile(), |
| 153 | - 'enableAutoSave' => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ) |
|
| 153 | + 'enableAutoSave' => lasso_editor_get_option('enable_autosave', 'lasso_editor') |
|
| 154 | 154 | ); |
| 155 | 155 | |
| 156 | 156 | |
| 157 | 157 | // wp api client |
| 158 | - wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true ); |
|
| 159 | - $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) ); |
|
| 160 | - wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings ); |
|
| 158 | + wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true); |
|
| 159 | + $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json')); |
|
| 160 | + wp_localize_script('wp-api-js', 'WP_API_Settings', $settings); |
|
| 161 | 161 | |
| 162 | - $postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min'; |
|
| 163 | - wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true); |
|
| 164 | - wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) ); |
|
| 162 | + $postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min'; |
|
| 163 | + wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true); |
|
| 164 | + wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects)); |
|
| 165 | 165 | |
| 166 | 166 | |
| 167 | 167 | } |
@@ -18,27 +18,27 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | 20 | // If this file is called directly, abort. |
| 21 | -if ( ! defined( 'WPINC' ) ) { |
|
| 21 | +if (!defined('WPINC')) { |
|
| 22 | 22 | die; |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | // Set some constants |
| 26 | -define( 'LASSO_VERSION', '0.9.10.2' ); |
|
| 27 | -define( 'LASSO_DIR', plugin_dir_path( __FILE__ ) ); |
|
| 28 | -define( 'LASSO_URL', plugins_url( '', __FILE__ ) ); |
|
| 29 | -define( 'LASSO_FILE', __FILE__ ); |
|
| 26 | +define('LASSO_VERSION', '0.9.10.2'); |
|
| 27 | +define('LASSO_DIR', plugin_dir_path(__FILE__)); |
|
| 28 | +define('LASSO_URL', plugins_url('', __FILE__)); |
|
| 29 | +define('LASSO_FILE', __FILE__); |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Load plugin if PHP version is 5.4 or later. |
| 33 | 33 | */ |
| 34 | -if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) { |
|
| 34 | +if (version_compare(PHP_VERSION, '5.4.0', '>=')) { |
|
| 35 | 35 | |
| 36 | - include_once( LASSO_DIR . '/bootstrap.php' ); |
|
| 36 | + include_once(LASSO_DIR.'/bootstrap.php'); |
|
| 37 | 37 | |
| 38 | 38 | } else { |
| 39 | 39 | |
| 40 | 40 | add_action('admin_head', 'lasso_fail_notice'); |
| 41 | - function lasso_fail_notice(){ |
|
| 41 | + function lasso_fail_notice() { |
|
| 42 | 42 | |
| 43 | 43 | printf('<div class="error"><p>Lasso requires PHP 5.4 or higher.</p></div>'); |
| 44 | 44 | |
@@ -9,9 +9,9 @@ discard block |
||
| 9 | 9 | |
| 10 | 10 | function __construct() { |
| 11 | 11 | |
| 12 | - add_action( 'admin_menu', array( $this, 'menu' ) ); |
|
| 13 | - add_action( 'network_admin_menu', array( $this, 'menu' ) ); |
|
| 14 | - add_action( 'wp_ajax_lasso-editor-settings', array( $this, 'process_settings' ) ); |
|
| 12 | + add_action('admin_menu', array($this, 'menu')); |
|
| 13 | + add_action('network_admin_menu', array($this, 'menu')); |
|
| 14 | + add_action('wp_ajax_lasso-editor-settings', array($this, 'process_settings')); |
|
| 15 | 15 | |
| 16 | 16 | } |
| 17 | 17 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | function menu() { |
| 24 | 24 | |
| 25 | 25 | // CHANGED Removed condition. |
| 26 | - add_submenu_page( 'lasso-editor', __( 'Settings', 'lasso' ), __( 'Settings', 'lasso' ), 'manage_options', 'lasso-editor-settings', array( $this, 'settings' ) ); |
|
| 26 | + add_submenu_page('lasso-editor', __('Settings', 'lasso'), __('Settings', 'lasso'), 'manage_options', 'lasso-editor-settings', array($this, 'settings')); |
|
| 27 | 27 | |
| 28 | 28 | } |
| 29 | 29 | |
@@ -45,22 +45,22 @@ discard block |
||
| 45 | 45 | function process_settings() { |
| 46 | 46 | |
| 47 | 47 | // bail out if current user isn't and administrator and they are not logged in |
| 48 | - if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() ) |
|
| 48 | + if (!current_user_can('manage_options') || !is_user_logged_in()) |
|
| 49 | 49 | return; |
| 50 | 50 | |
| 51 | - if ( isset( $_POST['action'] ) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer( 'nonce', 'lasso_editor_settings' ) ) { |
|
| 51 | + if (isset($_POST['action']) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer('nonce', 'lasso_editor_settings')) { |
|
| 52 | 52 | |
| 53 | - $options = isset( $_POST['lasso_editor'] ) ? $_POST['lasso_editor'] : false; |
|
| 53 | + $options = isset($_POST['lasso_editor']) ? $_POST['lasso_editor'] : false; |
|
| 54 | 54 | |
| 55 | - $options = array_map( 'sanitize_text_field', $options ); |
|
| 55 | + $options = array_map('sanitize_text_field', $options); |
|
| 56 | 56 | |
| 57 | - if ( function_exists( 'is_multisite' ) && is_multisite() ) { |
|
| 57 | + if (function_exists('is_multisite') && is_multisite()) { |
|
| 58 | 58 | |
| 59 | - update_site_option( 'lasso_editor', $options ); |
|
| 59 | + update_site_option('lasso_editor', $options); |
|
| 60 | 60 | |
| 61 | 61 | } else { |
| 62 | 62 | |
| 63 | - update_option( 'lasso_editor', $options ); |
|
| 63 | + update_option('lasso_editor', $options); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | wp_send_json_success(); |
@@ -82,129 +82,129 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | function lasso_editor_settings_form() { |
| 84 | 84 | |
| 85 | - if ( !is_user_logged_in() ) |
|
| 85 | + if (!is_user_logged_in()) |
|
| 86 | 86 | return; |
| 87 | 87 | |
| 88 | - $article_object = lasso_editor_get_option( 'article_class', 'lasso_editor' ); |
|
| 89 | - $featImgClass = lasso_editor_get_option( 'featimg_class', 'lasso_editor' ); |
|
| 90 | - $titleClass = lasso_editor_get_option( 'title_class', 'lasso_editor' ); |
|
| 88 | + $article_object = lasso_editor_get_option('article_class', 'lasso_editor'); |
|
| 89 | + $featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor'); |
|
| 90 | + $titleClass = lasso_editor_get_option('title_class', 'lasso_editor'); |
|
| 91 | 91 | |
| 92 | - $post_new_disabled = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' ); |
|
| 93 | - $save_to_post_disabled = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' ); |
|
| 94 | - $post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' ); |
|
| 95 | - $shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' ); |
|
| 96 | - $enable_autosave = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ); |
|
| 92 | + $post_new_disabled = lasso_editor_get_option('post_adding_disabled', 'lasso_editor'); |
|
| 93 | + $save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor'); |
|
| 94 | + $post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor'); |
|
| 95 | + $shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor'); |
|
| 96 | + $enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor'); |
|
| 97 | 97 | |
| 98 | - $toolbar_headings = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' ); |
|
| 99 | - $objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor'); |
|
| 100 | - $objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor'); |
|
| 98 | + $toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor'); |
|
| 99 | + $objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor'); |
|
| 100 | + $objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor'); |
|
| 101 | 101 | |
| 102 | 102 | ?> |
| 103 | 103 | <div class="wrap"> |
| 104 | 104 | |
| 105 | - <h2><?php _e( 'Editus Settings', 'lasso' );?></h2> |
|
| 105 | + <h2><?php _e('Editus Settings', 'lasso'); ?></h2> |
|
| 106 | 106 | |
| 107 | 107 | <form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data"> |
| 108 | 108 | |
| 109 | - <?php do_action('lasso_settings_before');?> |
|
| 109 | + <?php do_action('lasso_settings_before'); ?> |
|
| 110 | 110 | |
| 111 | 111 | <div class="lasso-editor-settings--option-wrap"> |
| 112 | 112 | <div class="lasso-editor-settings--option-inner"> |
| 113 | - <label><?php _e( 'Article Class', 'lasso' );?></label> |
|
| 114 | - <span class="lasso--setting-description"><?php _e( 'Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso' );?></span> |
|
| 115 | - <input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content"> |
|
| 113 | + <label><?php _e('Article Class', 'lasso'); ?></label> |
|
| 114 | + <span class="lasso--setting-description"><?php _e('Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso'); ?></span> |
|
| 115 | + <input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content"> |
|
| 116 | 116 | </div> |
| 117 | 117 | </div> |
| 118 | 118 | |
| 119 | 119 | <div class="lasso-editor-settings--option-wrap"> |
| 120 | 120 | <div class="lasso-editor-settings--option-inner"> |
| 121 | - <label><?php _e( 'Featured Image Class', 'lasso' );?></label> |
|
| 122 | - <span class="lasso--setting-description"><?php _e( 'Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso' );?></span> |
|
| 123 | - <input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content"> |
|
| 121 | + <label><?php _e('Featured Image Class', 'lasso'); ?></label> |
|
| 122 | + <span class="lasso--setting-description"><?php _e('Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso'); ?></span> |
|
| 123 | + <input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content"> |
|
| 124 | 124 | </div> |
| 125 | 125 | </div> |
| 126 | 126 | |
| 127 | 127 | <div class="lasso-editor-settings--option-wrap"> |
| 128 | 128 | <div class="lasso-editor-settings--option-inner"> |
| 129 | - <label><?php _e( 'Article Title Class', 'lasso' );?></label> |
|
| 130 | - <span class="lasso--setting-description"><?php _e( 'Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso' );?></span> |
|
| 131 | - <input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content"> |
|
| 129 | + <label><?php _e('Article Title Class', 'lasso'); ?></label> |
|
| 130 | + <span class="lasso--setting-description"><?php _e('Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso'); ?></span> |
|
| 131 | + <input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content"> |
|
| 132 | 132 | </div> |
| 133 | 133 | </div> |
| 134 | 134 | |
| 135 | 135 | <!-- Advanced --> |
| 136 | 136 | <div class="lasso-editor-settings--option-wrap"> |
| 137 | 137 | <div class="lasso-editor-settings--option-inner"> |
| 138 | - <label><?php _e( 'Ignored Items to Save', 'lasso' );?></label> |
|
| 139 | - <span class="lasso--setting-description"><?php _e( 'If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso' );?></span> |
|
| 140 | - <textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea> |
|
| 138 | + <label><?php _e('Ignored Items to Save', 'lasso'); ?></label> |
|
| 139 | + <span class="lasso--setting-description"><?php _e('If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso'); ?></span> |
|
| 140 | + <textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea> |
|
| 141 | 141 | </div> |
| 142 | 142 | </div> |
| 143 | 143 | |
| 144 | 144 | <div class="lasso-editor-settings--option-wrap"> |
| 145 | 145 | <div class="lasso-editor-settings--option-inner"> |
| 146 | - <label><?php _e( 'Read Only Items', 'lasso' );?></label> |
|
| 147 | - <span class="lasso--setting-description"><?php _e( 'If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso' );?></span> |
|
| 148 | - <textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea> |
|
| 146 | + <label><?php _e('Read Only Items', 'lasso'); ?></label> |
|
| 147 | + <span class="lasso--setting-description"><?php _e('If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso'); ?></span> |
|
| 148 | + <textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea> |
|
| 149 | 149 | </div> |
| 150 | 150 | </div> |
| 151 | 151 | |
| 152 | 152 | <div class="lasso-editor-settings--option-wrap"> |
| 153 | 153 | <div class="lasso-editor-settings--option-inner"> |
| 154 | - <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> > |
|
| 155 | - <label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable Toolbar Headings', 'lasso' );?></label> |
|
| 156 | - <span class="lasso--setting-description"><?php _e( 'By default the H2 and H3 options for headings are in the insert HTML area. You may prefer those headings to act just like the underline, and strikethrough, so toggling this will add them to the toolbar.', 'lasso' );?></span> |
|
| 154 | + <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> > |
|
| 155 | + <label for="lasso_editor[toolbar_headings]"><?php _e('Enable Toolbar Headings', 'lasso'); ?></label> |
|
| 156 | + <span class="lasso--setting-description"><?php _e('By default the H2 and H3 options for headings are in the insert HTML area. You may prefer those headings to act just like the underline, and strikethrough, so toggling this will add them to the toolbar.', 'lasso'); ?></span> |
|
| 157 | 157 | |
| 158 | 158 | </div> |
| 159 | 159 | </div> |
| 160 | 160 | |
| 161 | 161 | <div class="lasso-editor-settings--option-wrap"> |
| 162 | 162 | <div class="lasso-editor-settings--option-inner"> |
| 163 | - <input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked( $save_to_post_disabled, 'on' );?> > |
|
| 164 | - <label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label> |
|
| 165 | - <span class="lasso--setting-description"><?php _e( 'By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso' );?></span> |
|
| 163 | + <input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked($save_to_post_disabled, 'on'); ?> > |
|
| 164 | + <label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label> |
|
| 165 | + <span class="lasso--setting-description"><?php _e('By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso'); ?></span> |
|
| 166 | 166 | |
| 167 | 167 | </div> |
| 168 | 168 | </div> |
| 169 | 169 | |
| 170 | 170 | <div class="lasso-editor-settings--option-wrap"> |
| 171 | 171 | <div class="lasso-editor-settings--option-inner"> |
| 172 | - <input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> > |
|
| 173 | - <label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label> |
|
| 174 | - <span class="lasso--setting-description"><?php _e( 'Check this to disable users from being able to edit post settings from the front-end.', 'lasso' );?></span> |
|
| 172 | + <input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> > |
|
| 173 | + <label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label> |
|
| 174 | + <span class="lasso--setting-description"><?php _e('Check this to disable users from being able to edit post settings from the front-end.', 'lasso'); ?></span> |
|
| 175 | 175 | </div> |
| 176 | 176 | </div> |
| 177 | 177 | |
| 178 | 178 | <div class="lasso-editor-settings--option-wrap"> |
| 179 | 179 | <div class="lasso-editor-settings--option-inner"> |
| 180 | - <input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> > |
|
| 181 | - <label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label> |
|
| 182 | - <span class="lasso--setting-description"><?php _e( 'Check this box to disable users from being able to add new posts from the front-end.', 'lasso' );?></span> |
|
| 180 | + <input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> > |
|
| 181 | + <label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label> |
|
| 182 | + <span class="lasso--setting-description"><?php _e('Check this box to disable users from being able to add new posts from the front-end.', 'lasso'); ?></span> |
|
| 183 | 183 | </div> |
| 184 | 184 | </div> |
| 185 | 185 | |
| 186 | 186 | <div class="lasso-editor-settings--option-wrap"> |
| 187 | 187 | <div class="lasso-editor-settings--option-inner"> |
| 188 | - <input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> > |
|
| 189 | - <label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label> |
|
| 190 | - <span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span> |
|
| 188 | + <input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> > |
|
| 189 | + <label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label> |
|
| 190 | + <span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span> |
|
| 191 | 191 | </div> |
| 192 | 192 | </div> |
| 193 | 193 | |
| 194 | 194 | <div class="lasso-editor-settings--option-wrap last"> |
| 195 | 195 | <div class="lasso-editor-settings--option-inner"> |
| 196 | - <input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> > |
|
| 197 | - <label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label> |
|
| 198 | - <span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span> |
|
| 196 | + <input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> > |
|
| 197 | + <label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label> |
|
| 198 | + <span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span> |
|
| 199 | 199 | </div> |
| 200 | 200 | </div> |
| 201 | 201 | |
| 202 | - <?php do_action('lasso_settings_after');?> |
|
| 202 | + <?php do_action('lasso_settings_after'); ?> |
|
| 203 | 203 | |
| 204 | 204 | <div class="lasso-editor-settings--submit"> |
| 205 | 205 | <input type="hidden" name="action" value="lasso-editor-settings" /> |
| 206 | - <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" /> |
|
| 207 | - <?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?> |
|
| 206 | + <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" /> |
|
| 207 | + <?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?> |
|
| 208 | 208 | </div> |
| 209 | 209 | </form> |
| 210 | 210 | |