wordpress/wp-content/plugins/cms-tree-page-view/functions.php
/**
 * Add styles and scripts to pages that use the plugin
 */
Add styles and scripts to pages that use the plugin
Add styles and scripts to pages that use the plugin
function cms_admin_enqueue_scripts() {
	if (cms_tpv_is_one_of_our_pages()) {
		wp_enqueue_script( "jquery-cookie", CMS_TPV_URL . "scripts/jquery.biscuit.js", array("jquery"));
		wp_enqueue_script( "jquery-ui-sortable");
		wp_enqueue_script( "jquery-jstree", CMS_TPV_URL . "scripts/jquery.jstree.js", false, CMS_TPV_VERSION);
		wp_enqueue_script( "jquery-alerts", CMS_TPV_URL . "scripts/jquery.alerts.js", false, CMS_TPV_VERSION);
		wp_enqueue_script( "cms_tree_page_view", CMS_TPV_URL . "scripts/cms_tree_page_view.js", false, CMS_TPV_VERSION);
		wp_enqueue_style( "cms_tpv_styles", CMS_TPV_URL . "styles/styles.css", false, CMS_TPV_VERSION );
		wp_enqueue_style( "jquery-alerts", CMS_TPV_URL . "styles/jquery.alerts.css", false, CMS_TPV_VERSION );
		$oLocale = array(
			"Enter_title_of_new_page" => __("Enter title of new page", 'cms-tree-page-view'),
			"child_pages"  => __("child pages", 'cms-tree-page-view'),
			"Edit_page"  => __("Edit page", 'cms-tree-page-view'),
			"View_page"  => __("View page", 'cms-tree-page-view'),
			"Edit"  => __("Edit", 'cms-tree-page-view'),
			"View"  => __("View", 'cms-tree-page-view'),
			"Add_page"  => __("Add page", 'cms-tree-page-view'),
			"Add_new_page_after"  => __("Add new page after", 'cms-tree-page-view'),
			"after"  => __("after", 'cms-tree-page-view'),
			"inside"  => __("inside", 'cms-tree-page-view'),
			"Can_not_add_sub_page_when_status_is_draft"  => __("Sorry, can't create a sub page to a page with status \"draft\".", 'cms-tree-page-view'),
			"Can_not_add_sub_page_when_status_is_trash"  => __("Sorry, can't create a sub page to a page with status \"trash\".", 'cms-tree-page-view'),
			"Can_not_add_page_after_when_status_is_trash"  => __("Sorry, can't create a page after a page with status \"trash\".", 'cms-tree-page-view'),
			"Add_new_page_inside"  => __("Add new page inside", 'cms-tree-page-view'),
			"Status_draft" => __("draft", 'cms-tree-page-view'),
			"Status_future" => __("future", 'cms-tree-page-view'),
			"Status_password" => __("protected", 'cms-tree-page-view'),				"Status_pending" => __("pending", 'cms-tree-page-view'),
			"Status_private" => __("private", 'cms-tree-page-view'),
			"Status_trash" => __("trash", 'cms-tree-page-view'),
			"Status_draft_ucase" => ucfirst( __("draft", 'cms-tree-page-view') ),
			"Status_future_ucase" => ucfirst( __("future", 'cms-tree-page-view') ),
			"Status_password_ucase" => ucfirst( __("protected", 'cms-tree-page-view') ),				"Status_pending_ucase" => ucfirst( __("pending", 'cms-tree-page-view') ),
			"Status_private_ucase" => ucfirst( __("private", 'cms-tree-page-view') ),
			"Status_trash_ucase" => ucfirst( __("trash", 'cms-tree-page-view') ),
			"Password_protected_page" => __("Password protected page", 'cms-tree-page-view'),
			"Adding_page" => __("Adding page...", 'cms-tree-page-view'),
			"Adding" => __("Adding ...", 'cms-tree-page-view'),
			"No posts found" => __("No posts found.", 'cms-tree-page-view')
		);
		wp_localize_script( "cms_tree_page_view", 'cmstpv_l10n', $oLocale);
	}
}
function cms_admin_enqueue_scripts ( ) { if ( cms_tpv_is_one_of_our_pages ( ) ) { wp_enqueue_script ( " jquery-cookie " , CMS_TPV_URL . " scripts/jquery.biscuit.js " , array ( " jquery " ) ) ; wp_enqueue_script ( " jquery-ui-sortable " ) ; wp_enqueue_script ( " jquery-jstree " , CMS_TPV_URL . " scripts/jquery.jstree.js " , false , CMS_TPV_VERSION ) ; wp_enqueue_script ( " jquery-alerts " , CMS_TPV_URL . " scripts/jquery.alerts.js " , false , CMS_TPV_VERSION ) ; wp_enqueue_script ( " cms_tree_page_view " , CMS_TPV_URL . " scripts/cms_tree_page_view.js " , false , CMS_TPV_VERSION ) ; wp_enqueue_style ( " cms_tpv_styles " , CMS_TPV_URL . " styles/styles.css " , false , CMS_TPV_VERSION ) ; wp_enqueue_style ( " jquery-alerts " , CMS_TPV_URL . " styles/jquery.alerts.css " , false , CMS_TPV_VERSION ) ; $ oLocale = array ( " Enter_title_of_new_page " => __ ( " Enter title of new page " , 'cms-tree-page-view' ) , " child_pages " => __ ( " child pages " , 'cms-tree-page-view' ) , " Edit_page " => __ ( " Edit page " , 'cms-tree-page-view' ) , " View_page " => __ ( " View page " , 'cms-tree-page-view' ) , " Edit " => __ ( " Edit " , 'cms-tree-page-view' ) , " View " => __ ( " View " , 'cms-tree-page-view' ) , " Add_page " => __ ( " Add page " , 'cms-tree-page-view' ) , " Add_new_page_after " => __ ( " Add new page after " , 'cms-tree-page-view' ) , " after " => __ ( " after " , 'cms-tree-page-view' ) , " inside " => __ ( " inside " , 'cms-tree-page-view' ) , " Can_not_add_sub_page_when_status_is_draft " => __ ( " Sorry, can't create a sub page to a page with status  \" draft \" . " , 'cms-tree-page-view' ) , " Can_not_add_sub_page_when_status_is_trash " => __ ( " Sorry, can't create a sub page to a page with status  \" trash \" . " , 'cms-tree-page-view' ) , " Can_not_add_page_after_when_status_is_trash " => __ ( " Sorry, can't create a page after a page with status  \" trash \" . " , 'cms-tree-page-view' ) , " Add_new_page_inside " => __ ( " Add new page inside " , 'cms-tree-page-view' ) , " Status_draft " => __ ( " draft " , 'cms-tree-page-view' ) , " Status_future " => __ ( " future " , 'cms-tree-page-view' ) , " Status_password " => __ ( " protected " , 'cms-tree-page-view' ) , " Status_pending " => __ ( " pending " , 'cms-tree-page-view' ) , " Status_private " => __ ( " private " , 'cms-tree-page-view' ) , " Status_trash " => __ ( " trash " , 'cms-tree-page-view' ) , " Status_draft_ucase " => ucfirst ( __ ( " draft " , 'cms-tree-page-view' ) ) , " Status_future_ucase " => ucfirst ( __ ( " future " , 'cms-tree-page-view' ) ) , " Status_password_ucase " => ucfirst ( __ ( " protected " , 'cms-tree-page-view' ) ) , " Status_pending_ucase " => ucfirst ( __ ( " pending " , 'cms-tree-page-view' ) ) , " Status_private_ucase " => ucfirst ( __ ( " private " , 'cms-tree-page-view' ) ) , " Status_trash_ucase " => ucfirst ( __ ( " trash " , 'cms-tree-page-view' ) ) , " Password_protected_page " => __ ( " Password protected page " , 'cms-tree-page-view' ) , " Adding_page " => __ ( " Adding page... " , 'cms-tree-page-view' ) , " Adding " => __ ( " Adding ... " , 'cms-tree-page-view' ) , " No posts found " => __ ( " No posts found. " , 'cms-tree-page-view' ) ) ; wp_localize_script ( " cms_tree_page_view " , 'cmstpv_l10n' , $ oLocale ) ; } }
Add styles and scripts to pages that use the plugin
Add styles and scripts to pages that use the plugin
// renamed from cookie to fix problems with mod_security // wp_enqueue_script( "hoverIntent"); // is "protected" word better than "password" ?
 // is "protected" word better than "password" ?
